package com.bestvike.stone.spring.service;

import com.bestvike.stone.spring.context.ThreadContext;
import com.bestvike.stone.spring.shiro.auth.Auth;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Created by 许崇雷 on 2018-08-22.
 */
public class BaseService {
    protected final Log log = LogFactory.getLog(this.getClass());

    protected final String getToken() {
        return ThreadContext.getToken();
    }

    protected final <TAuth extends Auth> TAuth getAuth() {
        return ThreadContext.getAuth();
    }

    protected final <TUserData> TUserData getUserData() {
        return ThreadContext.getUserData();
    }
}
